<template>
    <div class="layout-container">
        <div class="left">
            <Card :card="card" :title="'平台超级管理员' + user" />
        </div>
        <div class="right">
            <router-view v-slot="{ Component }">
                <component :is="Component" />
            </router-view>
        </div>
    </div>
</template>

<script>
import Card from "@/pages/loginRegister/components/Card/index.vue";
import img from "@/assets/bg.jpg"
import { mapState } from "pinia";
import { useUserStore } from '../../store/user';

export default {
    name: "LoginLayout",
    components: {
        Card
    },
    data() {
        return {
            card: img,
        }
    },
    computed: {
        ...mapState(useUserStore, ['user'])
    }
}
</script>

<style lang="less" scoped>
.left {
    width: 45%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

.layout-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    padding-left: 45vw;
    box-sizing: border-box;
}

.right {
    width: 55vw;
    overflow: hidden;
}
</style>